#ifndef DATABASE_H
#define DATABASE_H

#include <QFile>
#include <QtXml/QtXml>
#include <QDebug>
#include <QString>
#include "product.h"
#include "supplier.h"


class DataBase
{
public:
    QString name;
    int deadline;
    int dailyProduction;
    int amount;
    QDomDocument document;
    QVector<Product> products; //to som podprodukty wg luksowego :)

public:
    DataBase(QString location);
    DataBase();
    Product getProduct(int i);
    int addProduct(Product &fresh_product);
    int addProduct(QString _productName, QString _unit, float _quantity);
    bool removeProduct(int i);
    void clearProducts();
    QString getName();
    int getDeadline();
    int getAmount();
    int countProducts();
    int getQuantityAvalaiblePerDay();
};

#endif // DATABASE_H
